import { baseRequest } from "@/utils/request";
const request = (url, ...arg) => baseRequest(`/admin/v1/plan/${url}`, ...arg);

export default {
  // 获取人员分页
  page(data) {
    return request("page", data);
  },
  pageStudent(data) {
    return request("pageStudent", data);
  },
  queryPlanStdByStudyCodes(data) {
    return request("queryPlanStdByStudyCodes", data);
  },
  batchUpdateStudentData(data) {
    return request("batchUpdateStudentData", data);
  },
  syncInsertStudentData(data) {
    return request("syncInsertStudentData", data);
  },
  syncNewClassesStudentData(data) {
    return request("syncNewClassesStudentData", data);
  },
  cancelFreeTest(data) {
    return request("cancelFreeTest", data);
  },
  detailById(data) {
    return request("detailById", data);
  },
  setState(data) {
    return request("setState", data);
  },
  summaryData(data) {
    return request("summaryData", data);
  },
  deleteStudent(data) {
    return request("deleteStudent", data);
  },
  getGradeClassesList(data) {
    return request("getGradeClassesList", data);
  },
  getSchoolList(data) {
    return request("getSchoolList", data);
  },
  // 提交表单 edit为true时为编辑，默认为新增
  save(data, edit = false) {
    return request(edit ? "save" : "save", data);
  },
  saveResit(data) {
    return request("saveResit", data);
  },
  delete(data) {
    return request("delete", data);
  },
  downloadReportFile(data) {
    return request("downloadReportFile", data, "get", {
      responseType: "blob",
    });
  },
  exportForPrintExamTicket(data) {
    return request("listForPrintExamTicket", data, "post", {
      responseType: "blob",
    });
  },
  queryProjectList(data) {
    return request("queryProjectList", data);
  },
  updateCameraIp(data) {
    return request("updateCameraIp", data);
  },
  archive(data) {
    return request("archive", data);
  },
  getRelationClassesList(data) {
    return request("getRelationClassesList", data);
  },
  updateStudentInfo(data) {
    return request("updateStudentInfo", data);
  },
  queryStudentInfoByStudyCode(data) {
    return request("queryStudentInfoByStudyCode", data);
  },
  saveFreeTest(data) {
    return request("saveFreeTest", data);
  },
  saveFreeTestForNoScore(data){
    return request("saveFreeTestForNoScore", data);
  },
};
